<template>
	<view class="zy-row  privacy-view">
		<image :src="checked?getImageUrl('ic_checked.png'): getImageUrl('ic_uncheck.png')" style="width: 40rpx;"
			mode="widthFix" @click="changeChecked"></image>
		<text class="privacy-no"> 阅读并同意 </text>
		<text class="privacy" @click="onAgreement">《用户协议》</text>
		<text class="privacy-no"> 和 </text>
		<text class="privacy" @click="onPrivacy">《隐私政策》</text>
	</view>
</template>

<script>
	export default {
		name: "zy-privacy",
		data() {
			return {
				checked: false
			};
		},
		methods:{
			value(){
				return this.checked
			},
			changeChecked() {
				this.checked = !this.checked
			},
			onAgreement() {
				getApp().globalData.webUrl = "https://www.xksndf2002.cn/agreement.html";
				uni.navigateTo({
					url: '/main/web/web'
				})
			},
			onPrivacy() {
				getApp().globalData.webUrl = "https://www.xksndf2002.cn/privacy.html";
				uni.navigateTo({
					url: '/main/web/web'
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.privacy-view {
		// display: flex;
		// flex-direction: row;
		// align-items: center;
		font-size: $zy-font-sm;

		.privacy {
			color: $zy-color-main;
		}

		.privacy-no {
			color: #fff;
		}
	}
</style>